#pragma once
#include "Globals.h"



/*======|PARENTS|=========*/
struct	BaseObject
{
	//-Rendering
	D3DMATERIAL9		m_Material;
	LPDIRECT3DTEXTURE9	m_pTexture;
	ID3DXMesh*			m_pMesh;
	DWORD				m_dwSubset;			// index of subset of vertex buffer
	//-Matrix Multiplication
	float				m_fScale;
	D3DXVECTOR3			m_vPosition;
	sRotation			m_stRotation;
	//-Collision
	sBOX				BoundingRect;
	int					m_iMyType;	

	//-Identity
	bool				m_bActive;			//If the object is actually there


	/*======|Instantiation|=========*/
	BaseObject();
	BaseObject(float x, float y,float roll, float yaw, bool isActive,int Type);
	~BaseObject();
	
	/*======|Update|================*/
	virtual void Update(vector<BaseObject*> List){};
	bool isGoingToCollide(vector<BaseObject*> List, int Direction){};
	void RefreshBoundingBox();

	/*======|Moderator|=============*/
	virtual void RotateByDegree(float Roll, float Pitch, float Yaw);
};
typedef vector<BaseObject*> DrawList;

struct BaseCharacter : public BaseObject
{
	float Health;
	int CurrentState;
	BaseCharacter();
	BaseCharacter(float x, float y, float Health,int State, int Type);
	~BaseCharacter();

	bool isGoingToCollide(DrawList List, int Direction);
};


/*======|CHILDREN|========*/
struct	Brick : public BaseObject
{
	Brick();
	~Brick();
};
struct	Player : public BaseCharacter
{
	Player();
	void Update(DrawList List);
};



/*======|REJECTED|========*/

struct	BaseActivator : public BaseObject
{	
	/*======|Variables|=============*/
	bool isActivated;


	/*======|Instantiation|=========*/
	BaseActivator(){};
	BaseActivator(float x, float y, float z, bool OnOrOff, int Type){};

	/*======|Update|================*/
	virtual void ChangeState(){};

	/*======|Deconstruct|===========*/
	~BaseActivator(){};

};
struct	Enemy : public BaseCharacter
{
	/*======|Instantiation|=========*/
	Enemy(){};
	/*======|Moderator|=============*/
	void ConsiderPlayer(Player* player){};	//Controls the enemy state and Figures proiximity of player
};
class	Rock : public BaseObject
{
private:
	float m_fVelocityX;
	float m_fVelocityY;
public:
	/*======|Instantiation|=========*/
	Rock(){};
	/*======|Update|================*/
	void Update(){};
	/*======|Deconstruct|===========*/
	~Rock(){};
};
class	Door : public BaseActivator
{
private:
public:
	/*======|Instantiation|=========*/
	Door(){};
	/*======|Deconstruct|===========*/
	~Door(){};
	//Text goes here
};
class	Button: public BaseActivator
{
private:
	Door myDoor;
	//Pressure pads are attuned to doors
	//and activate them when pressed
public:
	/*======|Instantiation|=========*/
	Button(){};
	/*======|Moderators|============*/
	void Pressed(){};
	/*======|Deconstruct|===========*/
	~Button(){};
};

#include "Graphics.h"